@extends('home.layout.base')
<link rel="stylesheet" href="{{URL::asset('./css/hrmy/index.css')}}">
<style type="text/css">
.footprintMian>div {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(204, 204, 204, 1);
}

.footprintMian>div:last-child {
    border-bottom: 0px;
}

.footprintMian>div>img,
.footprintMian>div .itemMone {
    height: 80px;
    width: 80px;
}

.footprintMian>div .itemMone {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-family: Source Han Sans CN;
    font-weight: bold;
    color: rgba(209, 0, 24, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left:0;
}
.footprintMian>div .itemMone a {
    font-size: 16px;
    color: rgba(209, 0, 24, 1);
}
.footprintMian>div>button {
    width: 100px;
    height: 30px;
    background: #ffffff;
    border: 1px solid rgba(204, 204, 204, 1);
    opacity: 1;
    border-radius: 2px;
    font-size: 16px;
    font-family: Source Han Sans CN;
    font-weight: 400;
    line-height: 28px;
    color: rgba(51, 51, 51, 1);
    text-align: center;
}

.footprintMian>div>div {
    width:  690px;
    padding-left: 36px;
    padding-right: 135px;
    display: grid;
    grid-row-gap: 15px;
    align-items: center;
}
</style>
@section('content')
<div class="main" id="hrIndex">
    <div class="storelistTitle" id="storelistTitle" v-cloak>
        <span class="storelistTitle_left">
            <span>

                <img src="{{URL::asset('./img/icon/home.png')}}">
            </span>
            <span><a href="{{route('home.index.index') }}">首页</a> > 用户中心</span>
        </span>
        <span class="storelistTitle_right">
            <span>找不到合适的供应商？发个需求试试？</span>
            <button @click=" window.location.href = '{{ route('home.demand.demandAdd') }}'">免费发布需求</button>
        </span>
    </div>
    <div class="hrContent">
        @include('home.hrmy.menu')
        <div class="hrContentRight" id="hrIndexs" v-cloak>
            <div class="myOrder">
                <div class="myTitle">
                    <div><span></span>我的订单</div>
                    <a href="{{route('home.hrmy.hrOrder')}}">订单管理中心 ></a>
                </div>
                <div class="myMesContent">
                    <div>
                        <a href="{{route('home.hrmy.hrOrder')}}">
                            <img src="{{URL::asset('./img/icon/obligation.png')}}">
                            待付款
                            <span>
                                （@{{userInfo.order_wait_pay}}）
                            </span>
                        </a>
                    </div>
                    <div>
                        <a href="{{route('home.hrmy.hrOrder')}}">
                            <img src="{{URL::asset('./img/icon/drop-shipping.png')}}">
                            待发货
                            <span>
                                （@{{userInfo.order_wait_send}}）
                            </span>
                        </a>
                    </div>
                    <div>
                        <a href="{{route('home.hrmy.hrOrder')}}">
                            <img src="{{URL::asset('./img/icon/waitreceiving.png')}}">
                            待收货
                            <span>
                                （@{{userInfo.order_wait_take}}）
                            </span>
                        </a>
                    </div>
                    <div>
                        <a href="{{route('home.hrmy.hrOrder')}}">
                            <img src="{{URL::asset('./img/icon/remain.png')}}">
                            待评价
                            <span>
                                （@{{userInfo.order_wait_evaluate}}）
                            </span>
                        </a>
                    </div>
                </div>
            </div>
            <div class="myPropertys">
                <div class="myProperty">
                    <div class="myTitle">
                        <div><span></span>我的资产</div>
                        <a href="{{route('home.hrmy.hrAssets') }}">资产管理中心 ></a>
                    </div>
                    <div class="integralBalance">
                        <a style="margin-right:109px;">
                            <span class="spanImg">
                                <img src="{{URL::asset('./img/icon/integral.png')}}">
                            </span>
                            <span class="spanMes">
                                <p>积分</p>
                                <p>@{{userInfo.integral}}分</p>
                            </span>
                        </a>
                        <a>
                            <img src="{{URL::asset('./img/icon/balance.png')}}">
                            <span class="spanMes">
                                <p>余额</p>
                                <p>@{{userInfo.balance}}元</p>
                            </span>
                        </a>
                    </div>
                </div>
                <div class="myCollect">
                    <div class="myTitle">
                        <div><span></span>我的收藏</div>
                    </div>
                    <div class="CollectMes">
                        <a href="{{route('home.hrmy.hrCollectStore')}}">
                            <span>@{{userInfo.collect_store}}</span>
                            <span>店铺收藏</span>
                        </a>
                        <a href="{{route('home.hrmy.hrCollectGoods')}}">
                            <span>@{{userInfo.collect_goods}}</span>
                            <span>商品收藏</span>
                        </a>
                        <a href="{{route('home.hrmy.hrCollectWord')}}">
                            <span>@{{userInfo.collect_word}}</span>
                            <span>文档收藏</span>
                        </a>
                        <a href="{{route('home.hrmy.hrCollectNews')}}">
                            <span>@{{userInfo.collect_news}}</span>
                            <span>新闻收藏</span>
                        </a>
                    </div>
                </div>
            </div>
            <div class="myFootprint">
                <div class="myTitle">
                    <div><span></span>我的足迹</div>
                    <a href="{{route('home.hrmy.hrFootprint')}}">查看更多 ></a>
                </div>
                <div class="footprintMian" v-for="(item,index) in footprint">
                    <!-- 供应商 -->
                    <div class="footprint_store" v-if="item.type==1">
                        <img :src="item.store.logo">
                        <div>
                            <p class="footprint_title">
                                <span class="footprint_name">@{{item.store.store_name}}
                                    <img v-if="item.store.quality==2" src="{{URL::asset('./img/icon/storeColloct.png')}}">
                                    <img v-if="item.store.hot==2" src="{{URL::asset('./img/icon/storeHot.png')}}">
                                </span>
                                <span class="browseTime"> 浏览于<span>
                                        @{{item.created_at}}
                                    </span></span>
                            </p>
                            <p class="footprint_1">
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/storeListEye.png')}}">--}}
                                    <span style="margin-right: 3px;">浏览量</span>
                                    @{{item.store.view}}
                                </span>
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/storeListTel.png')}}">--}}
                                    <span style="margin-right: 3px;">来电咨询</span>
                                    @{{item.store.call}}
                                </span>
                                {{--<span>--}}
                                    {{--<img src="{{URL::asset('./img/icon/storeListNote.png')}}">--}}
                                    {{--@{{item.store.service}}--}}
                                {{--</span>--}}

                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/storeListZan.png')}}">--}}
                                    <span style="margin-right: 3px;">好评</span>
                                    @{{item.store.credit}}%
                                </span>
                            </p>
                            <p>
                                @{{item.store.service_scope}}
                        </div>
                        <button @click=" window.location.href = '{{ route('home.store.store') }}?id='+item.store.id">
                            查看详情
                        </button>
                    </div>
                    <!-- 产品 -->
                    <div class="footprint_goods" v-if="item.type==3 && item.goods">
                        <img :src="item.goods?item.goods.thumb:''">
                        <div>
                            <p class="footprint_title">
                                <span class="footprint_name">@{{item.goods.title}}
                                </span>
                                <span class="browseTime"> 浏览于<span>
                                        @{{item.created_at}}
                                    </span></span>
                            </p>
                            <p class="footprint_goodsMes">
                                @{{item.goods.description}}
                            </p>
                            <p class="footprint_goodsFooter">
                                <span v-if="item.goods.type!=3">
                                    <span style="margin-right: 3px;color: red;">价格</span>
                                    <span style="color: red;" v-if="item.goods.price!=0.00">￥@{{item.goods.price}}</span>
                                    <span style="color: red;" v-else>免费</span>
                                </span>
                                <span v-else>
                                    <span style="margin-right: 3px;color: red;">价格</span>
                                    <span style="color: red;" v-if="item.goods.price!=0.00">@{{item.goods.price}} 积分</span>
                                    <span style="color: red;" v-else>免费</span>
                                </span>
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/storeListEye.png')}}">--}}
                                    <span style="margin-right: 3px;">成交量</span>
                                    @{{item.goods.salenum}}
                                </span>
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/storeListEye.png')}}">--}}
                                    <span style="margin-right: 3px;">浏览量</span>
                                    @{{item.goods.view}}
                                </span>
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/storeListEye.png')}}">--}}
                                    <span style="margin-right: 3px;">好评</span>
                                    @{{item.goods.credit}}%
                                </span>
                            </p>
                        </div>
                        <button @click=" window.location.href = '{{ route('home.goods.goodsDetails') }}?goodsId='+item.goods.id+'&type='+item.goods.type">
                            查看详情
                        </button>
                    </div>
                    <!-- 活动 -->
                    <div class="footprint_activity" v-if="item.type==4 && item.act">
                        <img :src="item.act?item.act.thumb:''">
                        <div>
                            <p class="footprint_title">
                                <span class="footprint_name">@{{item.act.title}}
                                </span>
                                <span class="browseTime"> 浏览于<span>
                                        @{{item.created_at}}
                                    </span></span>
                            </p>
                            <p class="footprint_activityMes">
                                {{--<span>--}}
                                    {{--<img src="{{URL::asset('./img/icon/storeListEye.png')}}">--}}
                                    {{--@{{item.act.view}}--}}
                                {{--</span>--}}
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/monyred.png')}}">--}}
                                    <span style="margin-right: 3px;color: red;">价格</span>
                                    <span style="color: red;">@{{item.act.cost}}</span>
                                    <span style="padding: 0 2px;background: #ffa531;margin-left: 3px;border-radius: 2px;color: #fff; " v-if="item.act.act_state!='报名结束'">报名中</span>
                                    <span style="padding: 0 2px;background: #ccc;margin-left: 3px;border-radius: 2px;color: #fff; " v-else>报名结束</span>
                                </span>
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/child.png')}}">--}}
                                     <span style="margin-right: 3px;">已报名</span>
                                    @{{item.act.number}}
                                </span>
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/timeyellow.png')}}">--}}
                                    <span style="margin-right: 3px;">活动时间</span>
                                    @{{item.act.start_at}}
                                </span>
                            </p>
                        </div>
                        <button @click=" window.location.href = '{{ route('home.activity.actDetails') }}?cateId='+item.act.id">
                            查看详情
                        </button>
                    </div>
                    <!-- 文档 -->
                    <div class="footprint_word" v-if="item.type==5  && item.word">
                        <img :src="item.word?item.word.thumb:''">
                        <div>
                            <p class="footprint_title">
                                <span class="footprint_name">@{{item.word.title}}
                                </span>
                                <span class="browseTime"> 浏览于<span>
                                        @{{item.created_at}}
                                    </span></span>
                            </p>
                            <p class="footprint_wordMes footprint_activityMes">
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/storeListEye.png')}}">--}}
                                    <span style="margin-right: 3px;">浏览</span>
                                    @{{item.word.view}}
                                </span>
                                <span>
                                    {{--<img src="{{URL::asset('./img/icon/download.png')}}">--}}
                                    <span style="margin-right: 3px;">下载</span>
                                    @{{item.word.download}}
                                </span>
                                {{--<span>--}}
                                    {{--<img src="{{URL::asset('./img/icon/time.png')}}">--}}
                                    {{--@{{item.word.created_at}}--}}
                                {{--</span>--}}
                                <span>
                                    <span style="margin-right: 3px;">格式</span>
                                    <span v-if="item.word.format=='doc'">doc</span>
                                    <span v-if="item.word.format=='docx'">docx</span>
                                    <span v-if="item.word.format=='ppt'">ppt</span>
                                    <span v-if="item.word.format=='pdf'">pdf</span>
                                    <span v-if="item.word.format=='xlsx'">xlsx</span>
                                    <span v-if="item.word.format=='xls'">xls</span>
                                    {{--<img v-if="item.word.format=='doc' || item.word.format=='docx'" src="{{URL::asset('./img/icon/downWord.png')}}">--}}
                                    {{--<img v-if="item.word.format=='ppt'" src="{{URL::asset('./img/icon/downPPT.png')}}">--}}
                                    {{--<img v-if="item.word.format=='pdf'" src="{{URL::asset('./img/icon/downPdf.png')}}">--}}
                                    {{--<img v-if="item.word.format=='xlsx' || item.word.format=='xls'" src="{{URL::asset('./img/icon/downExel.png')}}">--}}
                                </span>
                            </p>
                        </div>
                        <button @click=" window.location.href = '{{ route('home.word.wordDetails') }}'">
                            查看详情
                        </button>
                    </div>
                    <!-- 需求 -->
                    <div class="footprint_demand" v-if="item.type==2">
                        <el-tooltip class="item" effect="dark" :content="item.demand.price+'万'" placement="top-start">
                            <span class="itemMone">
                                <a>
                                    ￥
                                </a>@{{item.demand.price}}万
                            </span>
                        </el-tooltip>
                        <div>
                            <p class="footprint_title">
                                <span class="footprint_name">@{{item.demand.title}}
                                    <img v-if="item.demand.urgent==2" src="{{URL::asset('./img/icon/urgent.png')}}">
                                </span>
                                <span class="browseTime"> 浏览于<span>
                                        @{{item.created_at}}
                                    </span></span>
                            </p>

                            <p>@{{item.demand.content}}</p>
                            <p class="footprint_demandFooter">
                                <span>
                                    <a>
                                        @{{item.demand.number}}
                                    </a>
                                    竞标

                                </span>
                                <span>
                                    <a>
                                        @{{item.demand.created_at}}
                                    </a>
                                    发布
                                </span>
                                <span>
                                    <a>
                                        @{{item.demand.end_at}}
                                    </a>
                                    截止
                                </span>
                            </p>
                        </div>
                        <!-- <button @click=" window.location.href = '{{ route('home.demand.demandHRDetails') }}'"> -->
                        <button @click=" window.location.href = '{{ route('home.demand.demandHRDetails') }}?demandId='+item.demand.id">
                            查看详情
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
@section('compontentScipts')
<script>
    $(() => {
        let app = new Vue({
            el: '#hrIndexs',
            data: () => {
                return {
                    userInfo: {},
                    footprint: [],
                }
            },
            created() {
                this.getDetails();
            },
            mounted() {},
            methods: {
                getDetails() {
                    let data = {}
                    apiAjax("{{ route('home.user.userInfoApi')}}", 'get', data, (res) => {
                        if (res.code == 0) {
                            this.userInfo = res.data;
                            this.footprint = res.data.footprint;
                        } else {
                            this.$message({
                                message: res.msg,
                                type: 'warning'
                            });
                        }
                    }, (erro) => {});
                },
            }
        })
    })
</script>
@endsection